﻿@model CloudStorageLight.Core.Web.CloudAccountVM
@{
    ViewBag.Title = "Delete Cloud Account";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    @Html.ValidationSummary(true, "", new { @class = "text-danger" })

    <div class="container">
        <div class="row" style="margin-top:20px;">
            <div class="row-same-height">
                <div class="col-md-2">
                    @(CloudStorageLight.Core.Web.ViewMessages.MsgCloudAccount)
                </div>
                <div class="col-md-5">
                    <p>@(Model.CloudAccount)</p>
                    @Html.HiddenFor(x => x.CloudAccount)
                </div>
            </div>
        </div>
        <div class="row">
            <div class="row-same-height">
                <div class="col-md-2">
                    @(CloudStorageLight.Core.Web.ViewMessages.MsgEmail)
                </div>
                <div class="col-md-5">
                    @(Model.EMailAddress)
                </div>
            </div>
        </div>
        <hr />
        <div class="row">
            <div class="row-same-height">
                <div class="col-md-7">
                    <input type="submit" id="deleteButton" value="@(CloudStorageLight.Core.Web.ViewMessages.CmdRemove)" class="btn btn-default" disabled="disabled" />
                    <text>@Html.CheckBox("agree")@(CloudStorageLight.Core.Web.ViewMessages.MsgRemoveCloudAccount)</text>
                </div>
            </div>
        </div>
    </div>

}

@section scripts{
    <script type="text/javascript">
        $(function () {
            $('#agree').change(function () {
                if ($(this).is(':checked')) {
                    $('#deleteButton').removeAttr('disabled');
                } else {
                    $('#deleteButton').attr('disabled', 'disabled');
                }
            });
        });
    </script>
}
